package com.hsyt.pms.orm.sys;

import com.hsyt.pms.api.dto.system.SysUserDto;
import com.hsyt.pms.api.vo.system.SysUserVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @ClassName: SysUserDao
 * @Description: 用户服务Dao
 * @author wangze@hsyuntai.com
 * @date 2019年2月12日 下午2:45:51
 */
@Repository
public interface SysUserDao {

    int countUserCode(String userCode);

    int insertSelective(SysUserDto dto);

    int updateByPrimaryKeySelective(SysUserDto dto);

    List<SysUserVo> listYunAdmin(SysUserDto dto);

    SysUserVo selectByPrimaryKey(Long userId);

    int deleteRole(Long userId);

    int insertRole(SysUserDto dto);

    int insertUserRole(@Param(value = "userId") Long userId, @Param(value = "roleId") Long roleId);

    List<SysUserVo> queryUserByDto(SysUserDto dto);

    List<Long>  queryRole(Long userId);
}
